package com.rockcent.api;

import com.rockcent.model.AddressModel;
import com.rockcent.model.BClientCustomerBO;
import com.rockcent.model.ContourMap;
import com.rockcent.model.CouponBO;
import com.rockcent.model.CouponModel;
import com.rockcent.model.CouponStore;
import com.rockcent.model.CustomerBO;
import com.rockcent.model.DeliveryModel;
import com.rockcent.model.IndustryGroupModel;
import com.rockcent.model.MessageBO;
import com.rockcent.model.OrderInfo;
import com.rockcent.model.OrderModel;
import com.rockcent.model.VerificationModel;
import com.rockcent.model.WalletModel;

import java.util.List;
import java.util.Map;

/**
 * 描述信息
 *
 * @author keegan
 * @date 15/8/6
 */
public interface KcuponApi {
    String QUERY_INDUSTRY_GROUP = "admin.queryIndustryGroup";
    String GET_CONTOUR = "admin.getContour";
    String CANCLE_ORDER = "customer.cancleOrder";
    String CREATE_QR_CODE = "customer.createQrCode";
    String ADD_FREE_COUPON = "customer.addFreeCoupon";
    String CREATE_COUPON_ORDER_NOW = "customer.createCouponOrderNow";
    String CREATE_COUPON_PACKAGE_ORDER = "customer.createCouponPackageOrder";
    String LIST_HOT_COUPON = "issue.listHotCoupon";
    String PAY_BY_WALLET = "payment.payByWallet";
    String SEND_SMS_CODE_FOR_REGISTER = "service.sendSmsCode4Register";
    String UPLOAD = "file.upload";
    String GET_VERIFICATION_DELIVERY = "verification.getVerificationDelivery";
    String ADD_FAVORITE = "customer.addFavorite";
    String ADD_COMMENT = "customer.addComment";
    String END_VERIFICATION_DELIVERY = "verification.endVerificationDelivery";
    String LIST_COUPON_STORE = "issue.listCouponStore";
    String GET_ADDRESS = "custAddress.get";
    String VIEW_COUPON_MODEL = "issue.viewCouponModel";
    String START_VERIFICATION_DELIVERY = "verification.startVerificationDelivery";

    String SEND_SMS_CODE_FOR_GET_LOGIN_PASSWORD = "service.sendSmsCode4GetLoginPassword";
    String LIST_COUPON_MODEl = "custQuery.listCouponModel";
    String GET_BCLIENT_CUSTOMER = "customer.getCustomer";
    String GET_SMS_CODE_FOR_REGISTER = "service.getSmsCode4Register";
    String LIST_ORDER = "customer.listOrder";
    String GET_CUSTOMER_WALLET = "customer.getCustomerWallet";
    String LIST_COUPON_WALLET = "customer.listCouponWallet";
    String INIT_PAYPASS = "customer.initPayPass";
    String FIND_PASS_BY_PHONE = "customer.findPassByPhone";
    String CHECK_CUST_EXIST = "customer.checkCustExist";
    String GET_PREFERENTIAL_COUPON = "customer.getPreferentialCoupon";
    String QUERY_INMESSAGE = "customer.queryInmessage";
    String CALC_PRICE = "customer.calcPrice";
    String READ_MESSAGE = "customer.readMessage";
    String REALNAME_AUTH = "customer.realnameAuth";
    String PAY_APP_ORDER_BY_WX = "payment.payAppOrderByWX";
    String MAKE_ORDER_TO_PAYING = "customer.makeOrderToPaying";

    /**
     * 初始化登录密码
     *
     * @param loginName
     * @param loginPassword
     * @param payPassword
     * @return
     */
    ApiResponse<Void> initPayPass(String loginName, String loginPassword, String payPassword);

    ApiResponse<Void> findPassByPhone(String loginName, String password, String code);

    /**
     * 获取客户信息
     *
     * @param loginName
     * @return
     */
    ApiResponse<BClientCustomerBO> getBClientCustomer(String loginName);

    /**
     * 我的钱包
     *
     * @param loginName
     * @return
     */
    ApiResponse<WalletModel> getCustomerWallet(String loginName);

    /**
     * 获取注册时的验证码
     *
     * @param phoneNum
     * @return
     */
    ApiResponse<String> getSmsCode4Register(String phoneNum);

    /**
     * 我的券包
     *
     * @param loginName
     * @param keyWords
     * @param state
     * @param type
     * @param currentPage
     * @param pageSize
     * @return
     */
    ApiResponse<List<CouponModel>> listCouponWallet(String loginName, String keyWords, int state, int type, int currentPage, int pageSize);

    /**
     * 我的订单
     *
     * @param loginName
     * @param keyWords
     * @param state
     * @param pageSize
     * @param currentPage
     * @return
     */
    ApiResponse<List<OrderModel>> listOrder(String loginName, String keyWords, String state, int pageSize, int currentPage);

    ApiResponse<Void> sendSmsCode4GetLoginPassword(String phoneNum);

    /**
     * 查询券列表
     *
     * @param keyword     关键字
     * @param modelType   券类型，参考ModelType
     * @param listType    列表类型，参考ListType
     * @param industryId  行业类别ID
     * @param currentPage 当前页数
     * @param pageSize    每页显示数量
     * @param locationId  城市ID
     * @return 券列表
     */
    ApiResponse<List<CouponBO>> listCouponModel(String keyword, int modelType, int listType, int industryId, int currentPage, int pageSize, int locationId);

    /**
     * 检查用户是否存在
     *
     * @return
     */
    ApiResponse<CustomerBO> checkCustExist(String loginName);

    /**
     * 券包中可叠加的优惠券
     *
     * @return
     */
    ApiResponse<Map<String, List<CouponModel>>> getPreferentialCoupon(String loginName, int cashModelId, int count);

    /**
     * 券包中可叠加的优惠券
     *
     * @return
     */
    ApiResponse<List<MessageBO>> queryInmessage(String phone, int currentPage, int pageSize, String state);

    /**
     * 计算总价格B端
     *
     * @param loginName
     * @param buyModelId
     * @param buyModelCnt
     * @param usePlusModelId
     * @return
     */
    ApiResponse<Map<String, Object>> calcPrice(String loginName, int buyModelId, int buyModelCnt, int usePlusModelId);

    /**
     * 阅读站内信
     *
     * @param loginName
     * @param msgId
     * @return
     */
    ApiResponse<Void> readMessage(String loginName, int msgId);

    /**
     * 阅读站内信
     *
     * @param loginName
     * @param realname
     * @param idnum
     * @param idPicUrl
     * @return
     */
    ApiResponse<Integer> realnameAuth(String loginName, String realname, String idnum, String idPicUrl, String idBackPicUrl);

    /**
     * 微信支付B端券获取预付ID
     *
     * @param orderNumber
     * @param mchId
     * @param appId
     * @return
     */
    ApiResponse<String> payAppOrderByWX(String orderNumber, String mchId, String appId);

    /**
     * 申请发货
     *
     * @param verificatonId
     * @param provinceId
     * @param provinceName
     * @param cityId
     * @param cityName
     * @param countyId
     * @param countyName
     * @param address
     * @param addressee
     * @param linkPhone
     * @param remark
     * @return
     */
    ApiResponse<String> startVerificationDelivery(int verificatonId, int provinceId, String provinceName, int cityId, String cityName, int countyId, String countyName, String address, String addressee, String linkPhone, String remark);

    ApiResponse<CouponModel> viewCouponModel(int couponModelId, String loginName, int channelId);

    /**
     * 获取收货地址
     *
     * @param loginName
     * @return
     */
    ApiResponse<AddressModel> getAddress(String loginName);

    /**
     * 获取发券商店 商店映射为发券的学校
     *
     * @param couponModelId
     * @return
     */
    ApiResponse<List<CouponStore>> listCouponStore(int couponModelId);

    ApiResponse<Void> endVerificationDelivery(int verificationId);

    ApiResponse<Void> addComment(String orderId, String loginName, int couponModelId, int score, String content, String isHidden, int verificationId);

    ApiResponse<Void> addFavorite(String loginName, int couponModelId);

    ApiResponse<DeliveryModel> getVerificationDelivery(int verificationId);

    ApiResponse<String> upload(String file, String fileName);

    ApiResponse<Void> sendSmsCode4Register(String phoneNum);

    ApiResponse<List<IndustryGroupModel>> queryIndustryGroup();

    /**
     * 钱包支付
     *
     * @param orderNumber
     * @param loginName
     * @param payPass
     * @return
     */
    ApiResponse<OrderInfo> payByWallet(String orderNumber, String loginName, String payPass);
    /**
     * 礼包
     *
     * @param loginName       登录名
     * @param couponPackageId 礼包ID
     * @return 订单ID
     */
    ApiResponse<String> createCouponPackageOrder(String loginName, String couponPackageId);

    /**
     * 生成订单
     *
     * @param loginName
     * @param couponModelId
     * @param count
     * @param channelId
     * @return
     */
    ApiResponse<OrderInfo> createCouponOrderNow(String loginName, int couponModelId, int count, int channelId, int plusModelId);

    /**
     * 获取首页轮廓图
     *
     * @return
     */
    ApiResponse<List<ContourMap>> getContour();

//    public ApiResponse<List<CommentModel>> listComment(int couponModelId, int currentPage, int pageSize);

    ApiResponse<List<CouponModel>> listHotCoupon(int pageSize, int currentPage);


    /**
     * 取消订单
     *
     * @param orderNumber
     * @param loginName
     * @return
     */
    ApiResponse<Void> cancleOrder(String orderNumber, String loginName);

    /**
     * 生成二维码
     *
     * @param loginName
     * @param couponModelId
     * @param count
     * @param channelId
     * @return
     */
    ApiResponse<VerificationModel> createQrCode(String loginName, int couponModelId, int count, int channelId);

    /**
     * 直接买券创建订单（免密码，优惠券，0元券）
     *
     * @param loginName     登录账号
     * @param couponModelId 券ID
     * @param count         数量
     * @param channelId     渠道ID,没有传0
     * @return
     */
    ApiResponse<OrderInfo> addFreeCoupon(String loginName, int couponModelId, int count, int channelId);

    /**
     * 支付中（订单）
     *
     * @param orderId 订单号
     * @return
     */
    ApiResponse<Boolean> makeOrderToPaying(String orderId);
}
